package com.ihr360.alps.api;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class IDListRequest<T> {
    List<T> ids;

    public IDListRequest() {
    }

    public IDListRequest(List<T> ids) {
        this.ids = ids;
    }

    public IDListRequest(Collection<T> ids) {
        if (ids instanceof List){
            this.ids = (List)ids;
        }else{
            this.ids = new ArrayList<>(ids);
        }
    }

    public List<T> getIds() {
        return ids;
    }

    public void setIds(List<T> ids) {
        this.ids = ids;
    }

    public static  IDListRequest<String> build(Collection<String> collection){
            return new IDListRequest<String>(collection);
    }
}